<!-- 搜索页 -->
<template>
	<view class="sou">
		<div class="nav"></div>
		<div class="one">
			<u-search placeholder="搜索" @custom="fan" shape="square" v-model="keyword" :show-action="true" actionText='取消'></u-search>
		</div>
		<div class="ppp"></div>
		<div class="two">
			<div class="p">按指定类型搜索</div>
			<div class="ul">
				<div class="li" @click="search" v-for="item in arr" :key="item.id">
					<div class="div">
						<image :src="item.img" mode=""></image>
					</div>
					<div class="span">{{item.name}}</div>
				</div>
				
				
			</div>
			<div class="three" v-show="show">
				<view class="">搜索历史</view>
				<view class="" style="color: #6979fe;" @click="del">删除</view>
			</div>
			<div class="five">
				<div class="li" v-for="item,index in list" :key="index" @click="add">
					<div class="left">
						<image src="../../../static/diImage/时钟.png" mode=""></image>
						<div class="span">{{item}}</div>
					</div>
					<u-icon name="arrow-right"></u-icon>
				</div>
			</div>
		</div>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:['搜索关键词','搜索关键词','搜索关键词','搜索关键词','搜索关键词','搜索关键词','搜索关键词','搜索关键词','搜索关键词','搜索关键词',],
				arr:[
					{id:1,name:'客户',img:'../../../static/diImage/客户.png'},
					{id:2,name:'线索',img:'../../../static/diImage/修改病毒.png'},
					{id:3,name:'商机',img:'../../../static/diImage/指南.png'},
					{id:4,name:'订单',img:'../../../static/diImage/订单.png'},
					{id:5,name:'联系人',img:'../../../static/diImage/联系人.png'},
					{id:6,name:'任务',img:'../../../static/diImage/任务.png'},
					{id:7,name:'日程',img:'../../../static/diImage/calendar-日历.png'},
					{id:8,name:'报告',img:'../../../static/diImage/报告.png'},
					
				],
				show:true,
			}
		},
		methods: {
			fan(){
				uni.navigateBack()
			},
			add(){
				uni.navigateTo({
					url:'/pages/di/sou1/sou1'
				})
			},
			search(){
				uni.navigateTo({
					url:'/pages/di/sou2/sou2'
				})
			},
			del(){
				this.list=[]
				this.show=false
			}
		}
	}
</script>

<style lang="scss">
.sou{
	width: 100%;
	height: 100vh;
	background-color: #f9f9f9;

}
.nav{
	width: 100%;
	height: 60rpx;
	background-color: white;
}
.ppp{
	width: 100%;
	height: 30rpx;
	background-color: white;
}
.one{
	width: 100%;
	padding: 0 20rpx;
	background-color: white;
}
.two{
	width: 100%;
	background-color: #f9f9f9;
	padding: 60rpx 20rpx;
	.p{
		width: 100%;
		text-align: center;
	}
	.ul{
		width: 100%;
		display: flex;
		flex-wrap: wrap;
		margin-top: 40rpx;
		width: 100%;
		.li{
			width: 25%;
			margin-top: 40rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			.div{
				width: 120rpx;
				height: 120rpx;
				border-radius: 50%;
				background-color: #e4e4e4;
				display: flex;
				align-items: center;
				justify-content: center;
				image{
					width: 80rpx;
					height: 80rpx;
				}
			}
			.span{
				margin-top: 20rpx;
			}
		}
	}
}
.three{
	padding: 0 20rpx;
	width: 100%;
	display: flex;
	margin-top: 80rpx;
	justify-content: space-between;
}
.five{
	width: 100%;
	margin-top: 40rpx;
	.li{
		width: 100%;
		height: 100rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 20rpx;
		background-color: white;
		margin-top: 20rpx;
		border-radius: 10rpx;
		.left{
			display: flex;
			image{
				width: 50rpx;
				height: 50rpx;
				margin-right: 10rpx;
			}
			.span{
				color:#999999;
			}
		}
	}
}
</style>
